import 'package:kxy_flutter_app/helper/http.dart';
import 'package:kxy_flutter_app/model/course_category.dart';

class CourseService {
  Future<List<CourseCategory>> getCateList() async {
    var res = await Http.instance.post('/train-app/course/cate/list');

    if (res.code == 200) {
      return (res.data as List).map((e) => CourseCategory.fromJson(e)).toList();
    }
    return [];
  }
}
